Optimal. Leaf size=56 \[ \frac {a^2 \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3265, 398, 211}
\begin {gather*} \frac {a^2 \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 398
Rule 3265
Rubi steps
\begin {align*} \int \frac {\cosh ^5(x)}{a+b \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{a+b+b x^2} \, dx,x,\sinh (x)\right )\\ &=\text {Subst}\left (\int \left (-\frac {a-b}{b^2}+\frac {x^2}{b}+\frac {a^2}{b^2 \left (a+b+b x^2\right )}\right ) \, dx,x,\sinh (x)\right )\\ &=-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b}+\frac {a^2 \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\sinh (x)\right )}{b^2}\\ &=\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 61, normalized size = 1.09 \begin {gather*} -\frac {a^2 \text {ArcTan}\left (\frac {\sqrt {a+b} \text {csch}(x)}{\sqrt {b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(4 a-3 b) \sinh (x)}{4 b^2}+\frac {\sinh (3 x)}{12 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(164\) vs.
\(2(46)=92\).
time = 0.52, size = 165, normalized size = 2.95
method | result | size |
risch | \(\frac {{\mathrm e}^{3 x}}{24 b}-\frac {a \,{\mathrm e}^{x}}{2 b^{2}}+\frac {3 \,{\mathrm e}^{x}}{8 b}+\frac {{\mathrm e}^{-x} a}{2 b^{2}}-\frac {3 \,{\mathrm e}^{-x}}{8 b}-\frac {{\mathrm e}^{-3 x}}{24 b}-\frac {a^{2} \ln \left ({\mathrm e}^{2 x}-\frac {2 \left (a +b \right ) {\mathrm e}^{x}}{\sqrt {-a b -b^{2}}}-1\right )}{2 \sqrt {-a b -b^{2}}\, b^{2}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 \left (a +b \right ) {\mathrm e}^{x}}{\sqrt {-a b -b^{2}}}-1\right )}{2 \sqrt {-a b -b^{2}}\, b^{2}}\) | \(146\) |
default | \(-\frac {1}{3 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {-a +b}{b^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {2 a^{2} \left (\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )+2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}+\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )-2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}\right )}{b^{2}}-\frac {1}{3 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {-a +b}{b^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}\) | \(165\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 557 vs.
\(2 (46) = 92\).
time = 0.39, size = 1184, normalized size = 21.14 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.25, size = 243, normalized size = 4.34 \begin {gather*} \frac {{\mathrm {e}}^{3\,x}}{24\,b}-\frac {{\mathrm {e}}^{-3\,x}}{24\,b}+\frac {{\mathrm {e}}^{-x}\,\left (4\,a-3\,b\right )}{8\,b^2}+\frac {\sqrt {a^4}\,\left (2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^x\,\sqrt {b^5\,\left (a+b\right )}}{2\,b^2\,\left (a+b\right )\,\sqrt {a^4}}\right )-2\,\mathrm {atan}\left (\left (\frac {b^7\,\sqrt {b^6+a\,b^5}}{4}+\frac {a\,b^6\,\sqrt {b^6+a\,b^5}}{4}\right )\,\left ({\mathrm {e}}^x\,\left (\frac {2\,a^2}{b^8\,{\left (a+b\right )}^2\,\sqrt {a^4}}-\frac {4\,\left (2\,a^3\,b^3\,\sqrt {a^4}+2\,a^4\,b^2\,\sqrt {a^4}\right )}{a^5\,b^6\,\left (a+b\right )\,\sqrt {b^5\,\left (a+b\right )}\,\sqrt {b^6+a\,b^5}}\right )-\frac {2\,a^2\,{\mathrm {e}}^{3\,x}}{b^8\,{\left (a+b\right )}^2\,\sqrt {a^4}}\right )\right )\right )}{2\,\sqrt {b^6+a\,b^5}}-\frac {{\mathrm {e}}^x\,\left (4\,a-3\,b\right )}{8\,b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________